import Header from '@/components/MobileHeader.vue';
import Footer from '@/components/Footer.vue';
import NoticeTips from '@/components/NoticeTips.vue';
import msgWin from '@/views/mobile/consulting/components/msg-win.vue';
import deptInfo from '@/views/mobile/consulting/components/dept-info.vue';
import docProfile from '@/views/mobile/consulting/components/doc-profile.vue';
import vueSeamlessScroll from 'vue-seamless-scroll';
import { v4 as uuid } from 'uuid';
import RoomMixin from '@/views/mobile/consulting/mixins';
import { docBaseInfo } from '@/utils';
export default {
  name: 'useRoom',
  mixins: [RoomMixin],
  components: {
    Header,
    Footer,
    NoticeTips,
    msgWin,
    deptInfo,
    docProfile,
    vueSeamlessScroll
  },
  data() {
    return {
      scrollUuid: uuid(),
      docInfos: [],
      jsonData: {
        region_img_201_1: '', // logo
        region_text_100_1: {} // 温馨提示
      }
    };
  },
  computed: {
    classOption() {
      return {
        autoPlay: true,
        step: 1, // 数值越大速度滚动越快
        openTouch: false,
        limitMoveNum: 7, // 开始无缝滚动的数据量
        direction: 1 // 0向下 1向上 2向左 3向右
      };
    },
    single() {
      if (this.docInfos.length > 0) {
        return this.docInfos[0];
      } else {
        return docBaseInfo();
      }
    }
  },
  mounted() {},
  methods: {
    handleScrollEnd() {
      this.scrollUuid = uuid();
    }
  }
};
